$def with(msg = None, success = False, expire = False)
$:frender.header(title = '重置密码', bignav = True, css = ['default/css/lite.css'])

<script type="text/javascript">
    $$(function () {
        var form = $$('#reset-form');
        form.validator({'message': false});

        $$('.submit').click(function () {
            form.submit();
            return false;
        });

        $$.tools.validator.fn('[data-equals]', function (input) {
            var name = input.attr('data-equals');
            field = this.getInputs().filter('[name=' + name + ']');
            if (input.val() != field.val()) {
                $$('#err_' + input.attr('id')).show();
                $$('#err_' + input.attr('id')).html('<p style="color:red;">密码与确认密码不一致。</p>');
                return false;
            } else {
                $$('#err_' + input.attr('id')).hide();
                return true;
            }
        });

        $$.dialog('._login');
    });
</script>
<div id="content">
    <div class="layer layer-full">
        <div class="tube">
            <div class="block">
                
                
                <h1 class="tit">重置密码</h1>
                <!-- 注册寻宝图帐号 -->
                <div class="dymswitch-b com-box notopborder cur" style="display: block; border-top:1px solid #ebebeb;">
                    <div class="for-cont clr">
                        <!-- 左侧 -->
                        <div class="cnt-full clr">
                            <div class="loreg-t">
                            </div>

                            $if success:
                                <div class="loreg-l center" style="width:100%;">
                                    <p class="big_fnt"><img style="display:inline;" class="middle" src="$config.STATIC_PREFIX/images/common/valid_24.png" /><span>密码设置成功。</span></p>
                                    <p class="loreg-suc-btn"><a class="eml_rss_btn _login" href="/login?mode=lite"><b>立即登录</b></a></p>

                                    
                                </div>
                            $elif expire:
                                <div class="loreg-l center" style="width:100%;">
                                    <p class="big_fnt"><img style="display:inline;" class="middle" src="$config.STATIC_PREFIX/images/common/failure_24.png" /><span>该地址已过期。</span></p>
                                    <p class="loreg-suc-btn">
                                        <a class="eml_rss_btn" href="/reset-password"><b>重找密码</b></a>
                                    </p>

                                    
                                </div>
                            $else:
                                <div class="loreg-l">
                                    <form id="reset-form" name="wei-form" method="post">
                                        <!-- 密码 -->
                                        <dl>
                                            <dt><label>密码</label></dt>
                                            <dd>
                                                <input class="big_inp ipt mr8 l" type="password" id="pwd" autocomplete="off" name="pwd" required="required" />
                                            </dd>
                                            <dd class="for-error" id="err_email">
                                                $if msg:
                                                    <p style="color:#cc0000">$:msg</p>
                                                $else:
                                                    <p>密码长度6-32位之间。</p>
                                            </dd>
                                        </dl>
                                        <!-- 确认密码 -->
                                        <dl>
                                            <dt><label>确认密码</label></dt>
                                            <dd style="padding-bottom:10px;">
                                                <input class="big_inp ipt mr_8 l" type="password" id="pscwd" autocomplete="off" name="pscwd" required="required" data-equals="pwd" />
                                            </dd>
                                            <dd class="for-error" style="display:none;" id="err_pscwd">
                                                <p></p>
                                            </dd>
                                        </dl>
                                        
                                        <!-- 按钮 -->
                                        <div class="loreg-btn clr">
                                                <a class="eml_rss_btn submit" href="javascript:;"><b>重置</b></a>
                                        </div>
                                    
                                    </form>
                                </div>

                        </div>
                        
                    </div>
                </div>
                <!-- 注册寻宝图帐号 -->
            </div>
        </div> 
    </div>
</div>

$:frender.footer(bignav = True)
